﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;

namespace Cost.Models
{
    public partial class Organization
    {
        /// <summary>
        /// 组织类型
        /// </summary>
        [NotMapped]
        [Display(Name = "组织类型")]
        public OrgType? OrgTypeEnum
        {
            get
            {
                if (!string.IsNullOrEmpty(OrgType))
                {
                    return (OrgType)Enum.Parse(typeof(OrgType), OrgType);
                }
                else
                {
                    return null;
                }
            }
            set
            {
                OrgType = value.ToString();
            }
        }
    }
}
